package com.zzl.bonds.ticket.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zzl.apidoc.annotation.ApidocModel;
import com.zzl.apidoc.annotation.ApidocModelProperty;
import com.zzl.apidoc.constants.RequiredType;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 融资申请单
 *
 * @author gull
 * @date 2022-07-06 13:43:52
 */
@Data
@TableName("t_ticket_finance")
@ApidocModel
@SuppressWarnings("javadoc")
public class TicketFinanceEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.UUID)
    @ApidocModelProperty(description = "主键，业务流水号")
    private String id;
    @ApidocModelProperty(description = "融资编号")
    private String financeBillNo;
    @ApidocModelProperty(description = "凭证金额")
    private Double ticketAmount;
    @ApidocModelProperty(description = "融资金额")
    private Double financeAmount;
    @ApidocModelProperty(description = "入账银行账号id")
    private String financeBankId;
    @ApidocModelProperty(description = "入账银行账号")
    private String financeDepositBank;
    @ApidocModelProperty(description = "开户网点名称")
    private String financeDepositBankName;
    @ApidocModelProperty(description = "开户行全称")
    private String fullNameOpeningBank;
    @ApidocModelProperty(description = "金融机构id")
    private String instinctyId;
    @ApidocModelProperty(description = "金融机构名称")
    private String instinctyName;
    @ApidocModelProperty(description = "预计融资天数")
    private Integer financeDays;
    @ApidocModelProperty(description = "凭证的金融机构id")
    private String ticketInstinctyId;
    @ApidocModelProperty(description = "凭证的金融机构名称，用于页面展示")
    private String ticketInstinctyName;
    @ApidocModelProperty(description = "开单企业id")
    private String openEnterpriseId;
    @ApidocModelProperty(description = "开单企业名称")
    private String openEnterpriseName;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "开单日期", validate = "yyyy-MM-dd HH:mm:ss")
    private Date invoiceTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "到期日期", validate = "yyyy-MM-dd HH:mm:ss")
    private Date expireTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "兑付日期", validate = "yyyy-MM-dd HH:mm:ss")
    private Date cashTime;
    @ApidocModelProperty(description = "开单企业统一社会信用代码")
    private String openSocialCreditCode;
    @ApidocModelProperty(description = "转单企业id")
    private String transferEnterpriseId;
    @ApidocModelProperty(description = "转单企业统一社会信用代码")
    private String trnasferSocialCreditCode;
    @ApidocModelProperty(description = "转单企业名称")
    private String transferEnterpriseName;
    @ApidocModelProperty(description = "预计到账金额")
    private Double estimateLoanAmount;
    @ApidocModelProperty(description = "预计到账时间", validate = "yyyy-MM-dd", required = RequiredType.TRUE, example = "2022-8-15")
    private Date estimateDisbursementDate;
    @ApidocModelProperty(description = "融资成本")
    private Double financingCost;
    @ApidocModelProperty(description = "融资利率")
    private Double annualizedInterestRate;
    @ApidocModelProperty(description = "融资利息")
    private Double annualizedInterest;
    @ApidocModelProperty(description = "平台服务费率")
    private Double platServiceRate;
    @ApidocModelProperty(description = "平台服务费")
    private Double platServiceInterest;
    @ApidocModelProperty(description = "票据状态 融资中：1 复核中                    2 平台审核中                3 银行处理中                4 银行审核通过待放款    失败：5 复核不通过6 平台审核不通过7 银行处理不通过8 已撤销成功：9 已放款")
    private Integer ticketStatus;
    @ApidocModelProperty(description = "融资企业 id")
    private String enterpriseId;
    @ApidocModelProperty(description = "融资方名称")
    private String financeEnterpriseName;
    @ApidocModelProperty(description = "金融产品")
    private String productId;
    @ApidocModelProperty(description = "金融产品名称")
    private String productName;
    @ApidocModelProperty(description = "票据id")
    private String ticketId;
    @ApidocModelProperty(description = "票据编号")
    private String ticketNo;
    @ApidocModelProperty(description = "=放款金额")
    private Double loanAmount;
    @ApidocModelProperty(description = "预计服务费用（平台收取）")
    private Double serviceChage;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "放款日期", validate = "yyyy-MM-dd HH:mm:ss")
    private Date disbursementDate;
    @ApidocModelProperty(description = "融资上链地址")
    private String financeBillAddress;
    @ApidocModelProperty(description = "额度编号")
    private String creditNo;
    @ApidocModelProperty(description = "部门id")
    private Integer orgId;
    @ApidocModelProperty(description = "1 表示删除，0 表示未删除")
    @TableField(value = "is_deleted")
    @TableLogic(value = "0", delval = "1")
    private Integer deletedStatus;
    @ApidocModelProperty(description = "是否进入预兑付状态，0：未预兑付；1：进入预兑付")
    private Integer advancePaymentStatus;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "创建时间", validate = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "修改时间", validate = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    @ApidocModelProperty(description = "创建人")
    private Integer creatorId;
    @ApidocModelProperty(description = "修改人")
    private Integer updaterId;
    @ApidocModelProperty(description = "备注")
    private String remark;
    @ApidocModelProperty(description = "平台复核备注")
    private String platformCheckRemark;
    @ApidocModelProperty(description = "金融机构复核")
    private String financeCheckRemark;
    @ApidocModelProperty(description = "母单票据id")
    private String parentTicketId;
    @ApidocModelProperty(description = "母单票据编号")
    private String parentTicketNo;
    @ApidocModelProperty(description = "融资后留存的票据id")
    private String retentionTicketId;
    @ApidocModelProperty(description = "融资后留存的票据编号")
    private String retentionTicketNo;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "平台审批时间", validate = "yyyy-MM-dd HH:mm:ss")
    private Date platApprovalTime;
    @ApidocModelProperty(description = "平台审批人")
    private Integer platApprovalUserId;
    @ApidocModelProperty(description = "融资授信id")
    private String supplierCreditId;
    @ApidocModelProperty(description = "付息方式 ：1 融资方付息（默认）2 核心企业付息")
    private Integer paymentMode;
    @ApidocModelProperty(description = "企业冻结状态，0未冻结 1 冻结")
    private Integer enterpriseFreezingStatus;
    @ApidocModelProperty(description = "我的票据表  原始票 票的 主键id")
    private String ticketOriginId;
    @ApidocModelProperty(description = "审批状态 10：核心企业驳回 11、核心企业通过 20、平台驳回 21、平台通过 30、供应商驳回、31 供应商通过")
    private Integer approveStatus;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "融资确认时间", validate = "yyyy-MM-dd HH:mm:ss")
    private Date signTime;
    @ApidocModelProperty(description = "合同编号")
    private String contractNo;


}
